#pragma once
#include <opencv2/opencv.hpp>
#include "def.h"

typedef struct Data {
  Data()
    : area(0, 0, 0, 0)
    , center(0, 0)
    , total(0)
  { 
  }

  cv::Rect    area;
  cv::Point2d center;
  size_t      total;
} Data;


typedef std::pair<int32_t, Data> Pair;


struct result_comp{
  bool operator()(const Pair &lhs, const Pair &rhs)
  {
    return lhs.first < rhs.first;
  }
};

void test_reference(cv::Mat_<uint8_t> &m);
